	<link href="__CSS__/Team/tabl.css" rel="Stylesheet" rev="Stylesheet" />
	<style type="text/css">
		th,td{text-align:center;}
		.Avatar img{width:50px;height:50px;}
	</style>
    <form name="form1" method="post" action="" id="form1">
        <div style="width:481px; padding:0;margin:0;">
            <table summary="团队成员管理" id="box-table-a" style="float:left;">
                <thead>
                    <tr>
                        <th scope="col">头像</th>
                        <th scope="col">姓名</th>
                        <th scope="col">学校</th>
                        <th scope="col">申请理由</th>
                        <th scope="col">加入时间</th>
                        <th scope="col">操作</th>
                    </tr>
                </thead>
                <tbody>
						<tr>
							<td width="60px" class="Avatar">
								<img title="{$info.truename}" src="__UPFILE__/Img/Avatar/{$info.Captainface|default='default.gif'}" />
							</td>
							<td width="60px">{$info.CaptainName}</td>
							<td width="95px">{$info.SchoolName}</td>
							<td width="100px">团队创建者</td>
							<td width="95px">{$info.CraeteDate}</td>
							<td width="60px">
									
							</td>
						</tr>
					<foreach name="list" item="mb">
						<tr class="nocheck">
							<td width="65px" class="Avatar">
								<img title="{$mb.TrueName}" src='__UPFILE__/Img/Avatar/{$mb.Avatar|default="default.gif"}' />
							</td>
							<td width="60px">{$mb.TrueName}</td>
							<td width="95px">{$mb.SchoolName}</td>
							<td width="100px">{$mb.Info|default="理由为空"|substr=0,10}</td>
							<td width="95px">{$mb.CreateDate}</td>
							<td width="60px">
							<if condition="$mb.IsApproved eq 1 ">
								<a class="delthr" val="{$mb.mid}"  title="删除该团队成员" href="###">
										<img alt="" src="__IMG__/onError.gif">
								</a>
							<else />
								<a class="delthr" val="{$mb.mid}"  title="删除该团队成员" href="###">
										<img alt="" src="__IMG__/onError.gif">
								</a>
								<a class="approve" val="{$mb.uid}"  title="纳入团队成员" href="###">
										<img alt="" src="__IMG__/onCorrect.gif">
								</a>
							</if>
							
							</td>
						</tr>
					</foreach>
                </tbody>
            </table>
        </div>
    </form>
<script>
   $(function(){
    $('.delthr').click(function(){
		  var isdel=confirm('您确定要删除吗？');
		  if(isdel){
			var val=$(this).attr("val");
			obj=$(this);
			$.ajax({
			  type: "POST",
			  url: "__URL__/delteammember",
			  data: "memberid="+val,
			  success: function(msg){
				obj.parentsUntil('.nocheck').parent().remove();
			  }
			});
		}else{
			return false;
		}

    });
	$('.approve').click(function(){
        var val=$(this).attr("val");
        obj=$(this);
        $.ajax({
			url:'__URL__/approveteammember',
			type:'POST',
			data: "membersid="+val,
			dataType:'json',
			success:function(data){
				alert(data.msg);
				if(data.res){
					$('.approve').remove();
				}
			},
			error:function(){
				alert('加载信息失败!');
			}
		});
	});
	
});
 
   
</script>
